<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
    <% String path = request.getContextPath();
    //用户名
  	String loginName = (String)request.getSession().getAttribute("loginName");
  	String loginState = (String)request.getSession().getAttribute("loginState");
    if(loginState == null || !(loginState.equals("1"))) {
    	response.sendRedirect("login.jsp");
    } 
    %>
    
<title>家庭医生式服务信息管理平台</title>
<link rel="stylesheet" type="text/css"	href="<%=path%>/css/btn_class.css" />
<link rel="stylesheet" type="text/css"	href="<%=path%>/extjs/resources/css/ext-all.css" />
<link rel="stylesheet" type="text/css"	href="<%=path%>/extjs/style.css" />
<script type="text/javascript"	src="<%=path%>/extjs/adapter/ext/ext-base.js"></script>
<script type="text/javascript"	src="<%=path%>/extjs/ext-all.js"></script>


<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<style type="text/css">
	html, body {
        font:normal 12px verdana;
        margin:0;
        padding:0;
        border:0 none;
        overflow:hidden;
        height:100%;
    }
	p {
	    margin:5px;
	}
	.sys_home {
        background-image:url(<%=path%>/extjs/icons/house.png);
    }
    .sys_set {
        background-image:url(<%=path%>/extjs/icons/wrench_orange.png);
    }
    .sys_manage {
        background-image:url(<%=path%>/extjs/icons/computer.png);
    }
    .sys_setting {
        background-image:url(<%=path%>/extjs/icons/cog.png);
    }
    .chart_set {
        background-image:url(<%=path%>/extjs/icons/chart_pie_link.png);
    }
    .chart_view {
        background-image:url(<%=path%>/extjs/icons/chart_bar.png);
    }
    .report_view {
        background-image:url(<%=path%>/extjs/icons/application_cascade.png);
    }
    .zhfx_view {
        background-image:url(<%=path%>/extjs/icons/map_magnify.png);
    }
    .hlgz_set {
        background-image:url(<%=path%>/extjs/icons/heart_add.png);
    }
    </style>
	<script type="text/javascript">
	Ext.BLANK_IMAGE_URL = '<%=path%>/extjs/resources/images/default/s.gif';
	//中间显示页面对象
	var center;
	//子页面调用的公用打开tab的方法
	function loadNewPanel(nodeid, nodename, url, folder) {
		var n = center.getComponent(nodeid);
		if (!n) {// 如果没有打开选项卡，打开
			center.add(new Ext.Panel(
					{
						id : nodeid,// 设置id
						title : nodename,
						//iconCls : iconcls,
						html : '<html><head></head><body><iframe name="ifr_table" id="ifr_table" scrolling="auto" frameborder="0" width="100%" height="100%" '
								+ 'src="' + folder + '/'
								+ url.replace('\/*', '')
								+ '"></iframe></body></html>',
						closable : true
					})).show();
		} else {// 否则显示该选项卡
		//	n.setTitle(nodename);
			n.show();
		//	if(folder == null || folder == "") {  //处理综合分析栏目
		//		window.frames["ifr_table"].location.href = "../../" + url;    
		//	} else {
		//		window.frames["ifr_table"].location.href = url;    
		//	}
			
			
		}
	}
	
	/* 主窗口 */
	Ext.onReady(function() {
				/* 设置提示消息的显示方式 */
				Ext.QuickTips.init();
				Ext.form.Field.prototype.msgTarget = 'side';
				
				var top = new Ext.Panel({
					region : 'center',
					resizeTabs : true,
					id : 'panel',
					contentEl : 'center1',
					frame: false,
					height: 50,
					border: false,
					baseCls:'x-plain',
					layout: 'fit',
					cls: 'topCls',
					layoutConfig : {
						padding: 0, 
						align: 'top'
					},
					defaults:{
						margins:'3 10 0 0'
					},
					html:'<div  id="changeClass" class="topCls" ></div>'
				});
				
				center = new Ext.TabPanel({
					region : 'center',
					resizeTabs : false,
					id : 'center-panel',
					cls : 'empty',
					activeTab : 0,
					// bodyStyle : 'background:#FFFFFF',
					autoScroll : true
				// html:'<br/><br/>&lt;empty center panel&gt;'
				});
				
				center.add(new Ext.Panel(
						{
							title : '首页',
							iconCls : 'sys_home',
							html : '<html><head></head><body><iframe name="ifr" id="ifr" scrolling="auto" frameborder="0" width="100%" height="100%" '
								+ 'src="mould_published/sy.jsp"></iframe></body></html>',
							closable : false
						}));
				center.show();
				
				var viewport = new Ext.Viewport({
		            layout:'border',
		            items:[
		                {
		                    region:'south',
		                    contentEl: 'south',
		                    split:false,
		                    height: 20,
		                    minSize: 20,
		                    maxSize: 20,
		                    collapsible: false,
		                   // title:'　',
		                    margins:'0 0 1 0'
		                }, {
			                    region:'center',
			                   // title: '当前位置',
			                    collapsible: false,
			                    split:true,
			                    width: 225,
			                    minSize: 175,
			                    maxSize: 400,
			                    layout:'fit',
			                    margins:'0 5 0 0',
			                    items: [center]
			                },{
		                    region:'west',
		                    id:'west-panel',
		                    //title:'系统导航',
		                    split:true,
		                    width: 220,
		                    minSize: 175,
		                    maxSize: 400,
		                    collapsible: true,
		                    margins:'0 0 0 5',
		                    layout:'accordion',
		                    layoutConfig:{
		                        animate:true
		                    },
		                    items: [{
		                        title:'系统导航',
		                        html : '<html><head></head><body><iframe name="ifr_column" id="ifr_column" scrolling="false" frameborder="0" width="100%" height="100%" '
									+ 'src="column_view.jsp"></iframe></body></html>',
		                        border:false,
		                        iconCls:'sys_manage'
		                    }]
		                }
		             ]
		        });
		    });
			</script>
		</head>
		<body>
		  <div id="west">
		    
		  </div>
		  <div id="north">
		  </div>
		  
		  <div id="center1">
		  </div>
		  <div id="props-panel" style="width:200px;height:200px;overflow:hidden;">
		  </div>
		  <div id="south">
		    <p>欢迎使用家庭医生式服务信息管理平台</p>
		  </div>

		 </body>
		</html>